package com.chenxin.interact.domain.dto;

import com.chenxin.interact.domain.sapToWms.SapToWmsItem;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

@Data
public class SapResponseDTO implements Serializable {
    private static final long serialVersionUID = 1L;
    @JsonProperty("ES_PAGEINFOR")
    private EsPageInfo esPageInfo;

    @JsonProperty("ES_RET")
    private EsRet esRet;

    @JsonProperty("IT_DATA")
    private ItData itData;

    public static class EsPageInfo {
        @JsonProperty("CURRENTPAGE")
        private int currentPage;

        @JsonProperty("TOTALPAGE")
        private int totalPage;

        @JsonProperty("TOTALLINES")
        private int totalLines;

        @JsonProperty("PAGELINES")
        private int pageLines;

        public int getCurrentPage() {
            return currentPage;
        }

        public int getTotalPage() {
            return totalPage;
        }

        public int getTotalLines() {
            return totalLines;
        }

        public int getPageLines() {
            return pageLines;
        }
    }

    public static class EsRet {
        @JsonProperty("RETKEYID")
        private long retKeyId;

        @JsonProperty("CODE")
        private String code;

        @JsonProperty("MSG")
        private String msg;

        @JsonProperty("KEY1")
        private String key1;

        @JsonProperty("KEY2")
        private String key2;

        @JsonProperty("KEY3")
        private String key3;

        @JsonProperty("RETMESSAGEID")
        private String retMessageId;

        public long getRetKeyId() {
            return retKeyId;
        }

        public void setRetKeyId(long retKeyId) {
            this.retKeyId = retKeyId;
        }

        public String getCode() {
            return code;
        }

        public void setCode(String code) {
            this.code = code;
        }

        public String getMsg() {
            return msg;
        }

        public void setMsg(String msg) {
            this.msg = msg;
        }

        public String getKey1() {
            return key1;
        }

        public void setKey1(String key1) {
            this.key1 = key1;
        }

        public String getKey2() {
            return key2;
        }

        public void setKey2(String key2) {
            this.key2 = key2;
        }

        public String getKey3() {
            return key3;
        }

        public void setKey3(String key3) {
            this.key3 = key3;
        }

        public String getRetMessageId() {
            return retMessageId;
        }

        public void setRetMessageId(String retMessageId) {
            this.retMessageId = retMessageId;
        }
    }

    public static class ItData {
        @JsonProperty("item")
        private List<SapToWmsItem> items;

        public List<SapToWmsItem> getItems() {
            return items;
        }

        public void setItems(List<SapToWmsItem> items) {
            this.items = items;
        }
    }
}
